/**
    Copyright (C) 2011  Alexander Vollmer

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.jefb.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "CV_DESTINATION")
public class DestinationEntity extends BasicEntity implements Serializable, Comparable<DestinationEntity>{
	private static final long serialVersionUID = -1098284140675691376L;
	
	private String address;
	private String description;
	private String username;
	private String password;
	
	private String name;
	

	public DestinationEntity() {
		super();
	}

	public DestinationEntity(String address) {
		super();
		this.address = address;
	}

	@Column(name = "ADDRESS")
	public String getAddress() {return address;}

	@Column(name = "DESCRIPTION")
	public String getDescription() {return description;}
	
	@Column(name = "USERNAME")
	public String getUsername() {return username;}
	
	@Column(name = "PASSWORD")
	public String getPassword() {return password;}
	
	@Column(name = "NAME")
	public String getName() {return name;}
	
	public void setAddress(String address) {this.address = address;}
	public void setDescription(String description) {this.description = description;}
	public void setUsername(String username) {this.username = username;}
	public void setPassword(String password) {this.password = password;}
	public void setName(String name) {this.name = name;}

	public int compareTo(DestinationEntity arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DestinationEntity other = (DestinationEntity) obj;
		if (getId() == null) {
			if (other.getId() != null)
				return false;
		} else if (!getId().equals(other.getId()))
			return false;
		return true;
	}
	
}
